import functools

def prefix(strings, to_the_end=False):
  def decorator(func):
    @functools.wraps(func)
    def wrapper(*args, **kwargs):
      if to_the_end == False:
        return strings + func(*args, **kwargs)
      elif to_the_end == True:
        return func(*args, **kwargs) + strings
      return func(*args, **kwargs)
    return wrapper
  return decorator